<?php 
$conn = mysql_connect("127.0.0.1","root","");
mysql_select_db("xingtan");
$advice = mysql_real_escape_string($_POST['txt']);

$sql = sprintf("INSERT INTO advices(content) VALUES ('%s');", $advice);
print $sql . '<br/>';
print $advice . '<br/>';
mysql_query($sql);
mysql_close($conn);
?>
